package com.plugin.core.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 销售人员表
 *
 * @author plugin
 * @since 2025-07-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("elder_sales")
@Schema(description = "销售人员实体")
public class ElderSales implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键ID")
    private Long id;

    /**
     * 销售人员姓名
     */
    @TableField("sale_name")
    @Schema(description = "销售人员姓名")
    private String saleName;

    /**
     * 销售人员编号
     */
    @TableField("sale_code")
    @Schema(description = "销售人员编号")
    private String saleCode;

    /**
     * 联系电话
     */
    @TableField("phone")
    @Schema(description = "联系电话")
    private String phone;

    /**
     * 邮箱地址
     */
    @TableField("email")
    @Schema(description = "邮箱地址")
    private String email;

    /**
     * 所属部门
     */
    @TableField("department")
    @Schema(description = "所属部门")
    private String department;

    /**
     * 职位
     */
    @TableField("position")
    @Schema(description = "职位")
    private String position;

    /**
     * 状态：0-禁用，1-启用
     */
    @TableField("status")
    @Schema(description = "状态：0-禁用，1-启用")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    /**
     * 是否删除：0-未删除，1-已删除
     */
    @TableField("del")
    @TableLogic
    @Schema(description = "是否删除：0-未删除，1-已删除")
    private Integer del;
}
